import React, { Component, render } from './react'

const root = document.getElementById("root")
// const jsx = (
//     <div>
//         <p>Hello React</p>
//         <p>Hello Fiber</p>
//     </div>
// )

// render(jsx, root);

class Greating extends Component {
    constructor(props) {
        super(props)
        this.state = {
            name: 'Tom'
        }
    }
    render() {
        return <div>Hello ClassComponent{this.state.name}
            <button onClick={()=>this.setState({name:'Jerry'})}>button</button>
        </div>
    }
}

render(<Greating />, root)

// function FnComponent(props) {
//     return <div>{props.title}FnComponent</div>
// }

// render(<FnComponent title="Hello" />, root)